<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<script type="text/javascript"
	src="${initParam.url }/statics/js/jquery-1.12.4.js"></script>
<script type="text/javascript">
	$(function() {
		$("#categoryLevel1").change(function() {
			$.getJSON("categoryLevel2", {
				categoryLevel1 : $("#categoryLevel1").val()
			}, function(data) {
				var html = "<option value='0'>--请选择--</option>";
				$.each(data, function(i, item) {
					html += "<option value='"+item["id"]+"'>";
					html += item["categoryName"];
					html += "</option>";
				})
				$("#categoryLevel2").html(html);
				$("#categoryLevel3").html("");
			});
		});

		$("#categoryLevel2").change(function() {
			$.getJSON("categoryLevel3", {
				categoryLevel2 : $("#categoryLevel2").val()
			}, function(data) {
				var html = "<option value='0'>--请选择--</option>";
				$.each(data, function(i, item) {
					html += "<option value='"+item["id"]+"'>";
					html += item["categoryName"];
					html += "</option>";
				});
				$("#categoryLevel3").html(html);

			});
		});
	});
</script>
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
	<h2>
		查看APP信息：<i class="glyphicon glyphicon-user"></i><span>${user.devName }</span>
	</h2>
</nav>
<br />
<br />
<br />
<br />
<br />
<form id="doupdateApp" enctype="" action="doupdateApp"
	method="post">
	
	<table id="albumEdit" style="margin: 0px auto">
		<tr>
			<td>软件名称*</td>
			<td><input class="txt" type="text" id="softwareName"
				name="softwareName" value="${app.softwareName }"
				style="width: 250px;" /><label class="error"></label></td>
			<br/>
		</tr>
		<tr>
			<td>APK名称*</td>
			<td><input class="txt" type="text" disabled="disabled"
				value="${app.APKName }" id="APKName" name="APKName"
				style="width: 250px;" /><label class=""></label></td>
		</tr>

		<tr>
			<td>支持ROM*</td>
			<td><input class="txt" type="text" id="supportROM"
				name="supportROM" value="${app.supportROM }" style="width: 250px;" /><label
				class="error"></label></td>
		</tr>
		<tr>
			<td>界面语言*</td>
			<td><input class="txt" type="text" id="interfaceLanguage"
				name="interfaceLanguage" value="${app.interfaceLanguage }"
				style="width: 250px;" /><label class="error"></label></td>
		</tr>
		<tr>
			<td>软件大小*</td>
			<td><input class="txt" type="text" id="softwareSize"
				name="softwareSize" value="${app.softwareSize }"
				style="width: 250px;" /><label class="error"></label></td>
		</tr>
		<tr>
			<td>下载次数*</td>
			<td><input class="txt" type="text" id="downloads"
				name="downloads" value="${app.downloads }" style="width: 250px;" /><label
				class="error"></label></td>
		</tr>
		<tr>
			<td>所属平台*</td>
			<td><select name="flatform.valueId">
					<option value="0">--请选择--</option>
					<c:forEach items="${appFlatformList }" var="flatform">
						<c:if test="${flatform.valueId==flatformValue }">
							<option value="${flatform.valueId }" selected="selected">${flatform.valueName}</option>
						</c:if>
						<c:if test="${flatform.valueId!=flatformValue }">
							<option value="${flatform.valueId }">${flatform.valueName}</option>
						</c:if>
					</c:forEach>
			</select></td>
		</tr>
		<tr>
			<td>一级分类*</td>
			<td><select name="categoryLevel1.id" id="categoryLevel1">
					<option value="0">--请选择--</option>
					<c:forEach items="${categoryLevel1List }" var="categoryLevel1">
						<option value="${categoryLevel1.id }">${categoryLevel1.categoryName}</option>
					</c:forEach>
			</select></td>
		</tr>
		<tr>
			<td>二级分类*</td>
			<td><select id="categoryLevel2" name="categoryLevel2.id">
					<option value="0">--请选择--</option>
			</select></td>
		</tr>
		<tr>
			<td>三级分类*</td>
			<td><select id="categoryLevel3" name="categoryLevel3.id">
					<option value="0">--请选择--</option>
			</select></td>
		</tr>
		<tr>
			<td>APP状态*</td>
			<td><input class="txt" type="text" disabled="disabled"
				id="status" name="status.valueId" value="${app.status.valueName }"
				style="width: 250px;" /><label class="error"></label></td>
		</tr>
		<tr>
			<td>应用简介*</td>
			<td><textarea name="appInfo" style="width: 250px;">${app.appInfo }</textarea></td>
		</tr>
		<tr>
			<td>LOGO图片*</td>
			<td><img src="${app.logoLocPath }" alt="" /><br /></td>
		</tr>
		<tr>
			<td>
			<input type="hidden" value="${id}" name="id" />  
			<input id="btnSubmit" type="submit" name="btnSubmit"
				value="保存" /><input id="btnSubmit" type="submit" name="btnSubmit"
				value="返回" /></td>
		</tr>
	</table>



</form>
<button type="button" class="btn btn-info" id="returnPage">返回</button>